<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SwtOrderGoods extends Model
{
    use HasFactory;
	use HasDateTimeFormatter;

    protected $table = 'swt_order_goods';

    protected $guarded = [];

    public function order()
    {
        return $this->belongsTo(SwtOrder::class);
    }

    public function goods()
    {
        return $this->hasOne(SwtGood::class, 'id', 'goods_id');
    }
}
